Skip to content
This repository has been archived by the owner on May 6, 2021. It is now read-only.

added multicast reception in the udp effect #675

Merged
merged 24 commits into from Jun 4, 2016
Merged

added multicast reception in the udp effect #675

merged 24 commits into from Jun 4, 2016

Conversation

penfold42
Copy link
Contributor

the default udp.json will listen to unicast on port 2391 (as it used to)

the new udp-mcast.json will listen on multicast 239.255.28.01:2801 (but can be changed easily)

penfold42 and others added 24 commits April 2, 2016 12:18
- hyperiond only listens for TERM and INT. HUP is often used to get an exe to reread its config

Changed pgrep to add '-x' so it wont partial match on the exe name.
- I have multiple instances with multiple hyperiond-instance1 names
- this ensures the service script only kills the right process
removed some tabs in ws2812b.cpp
the new udp-mcast.json will listen on multicast 239.255.28.01:2801
@brindosch
Copy link
Contributor

Thank you, can´t wait to see what we will get next :)

@brindosch brindosch merged commit 5c76fab into hyperion-project:Beta Jun 4, 2016
@brindosch
Copy link
Contributor

@penfold42
another question, makes it sense to add these udp listener to the booteffect array at the config (and Hyperion)? You can´t use both. Maybe to add a additional array would make sense?
Not sure where are the programming edges here.

@penfold42
Copy link
Contributor Author

I'm not sur I understand your question

@brindosch
Copy link
Contributor

ah!
this is like the receiver from proto/json just for udp and you will se also a booteffect at this device if the "sender" sends it?

@penfold42
Copy link
Contributor Author

Yep

It effectively turns Hyperion into a UDP driven led device just like my ESP8266 based wifi receiver.

I had 3 Pi's running the multicast effect and a perl script running on a 4th device sending 3 bytes per led (RGB) data over multicast to all Pi's at the same time.

My perl script/4th box could just as easily be a another Hyperion set up to use the UDP led device type

@brindosch
Copy link
Contributor

@penfold42
the idea is to refactor this to a UDP receiver (like "Boblight Server")
As part of a cleanup - this is a "misused" option (booteffect array)

@penfold42
Copy link
Contributor Author

I don't know what a booteffect array is.

We could write a native built in QT based UDP receiver if there's enough demand.
It could be implemented as a boblight level thing or we could consider it as a grabber

@brindosch
Copy link
Contributor

you use this

    "bootsequence" : 
    {
        "color" : [0,0,0],
        "effect" : "Rainbow swirl fast",
        "duration_ms" : 3000,
        "priority" : 700
    },

Which is a little bit "misused"
A general udp receiver component like this:

    "udpServer" : 
    {
        "port" : XXXXX
    },

would be cleaner

@penfold42
Copy link
Contributor Author

I havent been using it as a boot effect (although you could)

I've just been using Hyperion-remote when I need the UDP listener running

@brindosch
Copy link
Contributor

Yeah the handling could be "better" :)

@redPanther
Copy link
Contributor

redPanther commented Jun 5, 2016

hope to clear this conversation a bit:

current state of "udp listener":
its implemented as effect. This means it is absolutely OK to use it on every place where effects are usable - that includes the bootsequence of course.
If this effect should have some different handling than the other effects (e.g. own section in config), than we build an inconsistency in effect handling. I'm voting against that special treatment!

But yeah something is wrong here:
an effect uses setcolor/setimage to tell hyperion how the leds should glow. The udp effect is be definition an effect, but it does to much. It takes network input and then send it to lights. If we wouldn't have json- proto- boblight server, I would say all things are right.
But we have already codeparts that makes network to light. The new "network to light" function for udp protocols should be implemented in the way how any other "network to light" stuff in hyperion.
=> @penfold42 realized this already

It could be implemented as a boblight level thing

and have the right solution (please don't do this as grabber, thx). Thing is, doing this in python as an effect is much faster (to develop), then doing this the clean way as own hyperion network service.

@brindosch brindosch modified the milestone: V1.03.0 Jun 10, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
3 participants